package com.example.securitydemo.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("t_user")
public class User extends Model<User> {
    // 用户状态：有效
    public static final int STATUS_VALID = 1;
    // 用户状态：锁定
    public static final int STATUS_LOCK = 0;

    @TableId(type = IdType.AUTO)
    private long id;

    private String realname;

    private String username;

    private String password;

    private int status;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;
}
